package jvm;

/**
 * @Author Stringzhua
 * @Date 2024/11/5 14:53
 * description:
 */
public class Demo01 {
    static {
        System.out.println("Demo01的静态代码块");
    }

    public static void main(String[] args) {
        Teacher teacher = new Teacher(200);
    }
}

class Teacher {
    public static int age = 100;

    static {
        age = 10;
        System.out.println("Teacher的静态代码块");
    }

    public Teacher(int age) {
        this.age = age;
    }
}
